if __name__ == '__main__':
    line = input()
    info = line.split(' ')
    w = int(info[0])
    h = int(info[1])
    v = int(info[2])
    for i in range(w + h):
        for j in range(w + v):
            if i < h and j >= w:
                print(' ', end='')
            else:
                print('Q', end='')
        print()
